//
//  BaseApi.m
//  SSWifi
//
//  Created by 酷安 @啥也不会啊啊啊啊啊啊  on 2024/1/23.
//

#import "BaseApi.h"

@implementation BaseApi
- (AFHTTPSessionManager *)manage{
    if(!_manage){
//        NSString *baseurl = self.serverHost;
        AFHTTPSessionManager *manage = [[AFHTTPSessionManager alloc] init];
        AFHTTPRequestSerializer*serializer = [AFHTTPRequestSerializer serializer];
        serializer.timeoutInterval = 2;
        [manage setRequestSerializer:serializer];
        AFHTTPResponseSerializer *rspSer = [AFJSONResponseSerializer serializer];
        rspSer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/html", @"text/json", @"text/javascript", @"text/plain", nil];
        [manage setResponseSerializer:rspSer];
        
        _manage = manage;
    }
    return _manage;
}


//- (NSString *)serverHost{
//    return  @"http://m.home";
//}


- (NSString *)devicesName{
    return @"None";
}
- (WiFiDeviceTypes)deviceType{
    return WiFiDevice_None;
}

- (void)dealloc{
    NSLog(@"%@->%@ dealloc",self.devicesName,@(self.deviceType));
}


@end
